#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

int main()
{
	string s1("hello gugu");
	
	int pos = s1.rfind('g');
	cout << pos << endl;
	cout << s1[pos];
	return 0;
}